using Firestarter.Test.Base;
using FireStarterModeller.Logic;
using Habanero.BO;
using Habanero.BO.ClassDefinition;
using Habanero.Test.BO.Loaders;
using NUnit.Framework;

namespace FireStarterModeller.Test.Logic.Loaders
{
    [TestFixture]
    public class TestDMXmlClassLoader : TestXmlClassLoader
    {
        [SetUp]
        public override void SetupTest()
        {
            //Runs every time that any testmethod is executed
            //base.SetupTest(); 
            
            TestUtilsDomain.SetupTest();
            BORegistry.DataAccessor = new DataAccessorInMemory();
            TestUtilsDomain.SetupFixture();
            base.Initialise();
        }

        [TestFixtureSetUp]
        public void TestFixtureSetup()
        {
            //Code that is executed before any test is run in this class. If multiple tests
            // are executed then it will still only be called once.
            TestUtilsDomain.SetupFixture();
        }

        [TearDown]
        public void TearDownTest()
        {
            //runs every time any testmethod is complete
        }

        protected override IDefClassFactory GetDefClassFactory()
        {
            var unsavedValidDMSolution = TestUtilsShared.CreateUnsavedValidDMSolution();
            return new FMDefClassFactory(unsavedValidDMSolution);
        }
        [Test]
        public override void TestClassWithUIDef()
        {
            base.TestClassWithUIDef();
        }

        [Test, Ignore("ClassID will always have a value in DMClass because every Habanero BO gets an ID")]
        public override void TestClassDefID_Null()
        {
            
        }
    }
}